/*
 * Native.h
 *
 *  Created on: 2011-7-21
 *      Author: gexiao
 */

/*
 * Dalvik's native call interface.
 *
 * You should follow the JNI function naming conventions, but prefix with
 * "Dalvik_" instead of "Java_".
 */
#ifndef NATIVE_H_
#define NATIVE_H_
#include "Common.h"
#include "Thread.h"
#include "oo/Object.h"

//exception-throwing stub for abstract methods (DalvikNativeFunc)
void dvmAbstractMethodStub(const u4* args, JValue* pResult);

/*
 * Resolve a native method. This uses the same prototype as a
 * DalvikBridgeFunc, because it takes the place of the actual function
 * until the first time that it's invoked.
 *
 * Causes the method's class to be initialized.
 *
 * Throws an exception and returns NULL on failure.
 */
void dvmResolveNativeMethod(const u4* args, JValue* pResult,
		const Method* method, struct Thread* self);

#endif /* NATIVE_H_ */
